package com.hawk.eye.framework.config.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @className: HawkEyeServerProperties
 * @description:
 * @author: salad
 * @date: 2022/10/23
 **/
@Data
@Component
@ConfigurationProperties(prefix = SystemProperties.PREFIX)
public class SystemProperties {

    public final static String PREFIX = "hawk-eye.server.system";

    /**
     *
     */
    private String rootPath;

    private String avatarPath;

    private String downloadPath;

    private String uploadPath;

    /**
     * 验证码类型
     */
    private String captchaType = "math";

    public String getAvatarPath() {
        return rootPath + avatarPath;
    }

    public String getDownloadPath() {
        return rootPath + downloadPath;
    }

    /**
     * 获取上传路径
     */
    public String getUploadPath() {
        return rootPath + uploadPath;
    }

}
